import http from 'api/http.js'

/**
 * post、get、put
 * http.post('url', params, 'query');
 * url:接口
 * params:参数
 * query:传参格式，默认为 data(body)传参，
 *      设置 query 为 params(query)传参，格式为：url?xx=xx
 * queryAndBody: 参数是否包含两个格式  query、body
 *    默认：false,
 *    如果设置为true
 *    参数形式如下，bodyObject内参数会在body传参，params 参数为 url?xxx=xxx
 *    params={
 *      xxx:xxx,
 *      bodyObject:String
 *    }
 */
// /api/v1/appointmentclientparameter/getdefaultmodel 根据IP获取客户端参数对象
export const getClientParamModelByIP = params => {
  return http.get("/api/v1/appointmentclientparameter/getdefaultmodel", params, "query");
}
// /api/v1/appointmentclientparameter/getmodel 获取客户端参数对象
export const getClientParamgModel = params => {
  return http.get("/api/v1/appointmentclientparameter/getmodel", params, "query");
}
// /api/v1/appointmentclientparameter/delete 删除客户端参数
export const deleteClientParam = params => {
  return http.delete('/api/v1/appointmentclientparameter/delete', params, 'delete')
}
// /api/v1/appointmentclientparameter/put 修改客户端参数
export const editClientParam = params => {
  return http.put('/api/v1/appointmentclientparameter/put', params)
}
// /api/v1/appointmentclientparameter/post 新增客户端参数
export const addClientParam = params => {
  return http.post("/api/v1/appointmentclientparameter/post", params);
}
// api​/v1​/appointmentclientparameter​/getpages 获取客户端参数分页列表数据
export const getClientParamPages = params => {
  return http.get("/api/v1/appointmentclientparameter/getpages", params, "query");
}
// /api/v1/appointmentlistdmb/gethasappointdmb 获取该机房最远的已预约时段--用于模板同步号源时提示哪个日期已预约
export const gethasappointdmb = params => {
  return http.get("/api/v1/appointmentlistdmb/gethasappointdmb", params, "query");
}
// 获取注意事项 /api/callregister/getexamnotice
export const getexamnotice = params => {
  return http.get("/api/v1/callregister/getexamnotice", params, "query");
}
// 获取唯一ID /api/hospital/getidgenerator
export const getidgenerator = params => {
  return http.get("/api/hospital/getidgenerator", params, "query");
}
// 文件获取 /api/v1/file/read
export const fileRead = params => {
  return http.getRIS(`/api/v1/file/read`, params, "query");
}
// 申请单上传 /api/v1/file
export const fileUp = params => {
  return http.postRIS(`/api/v1/file/6`, params);
}
// 申请单删除 /api/v1/file
export const fileDelete = params => {
  return http.deleteRIS(`/api/v1/file/6`, params);
}
//系统用户登录 (获取 Jwt 授权数据)
export const userLogin = params => {
  return http.postJWT("/api/Jwt/token", params);
}
// 刷新 Jwt 授权数据
export const refreshAccessToken = params => {
  return http.postJWT("/api/Jwt/RefreshAccessToken", params);
}
// token过期的令牌刷新
export const refreshToken = params => {
  return http.postJWT('/api/Jwt/RefreshToken', params)
}
//根据Token获取用户信息
export const getUserByToken = params => {
  return http.postJWT("/api/Jwt/GetUserByToken", params);
}
// 福鼎市医院的单点登录api/Jwt/tokensm2
export const loginByTokensm2 = params => {
  return http.postJWT("/api/Jwt/tokensm2", params);
}
//验证码短信发送
export const verificationCodeSMS = params => {
  return http.postJWT("/api/Jwt/VerificationCodeSMS", params);
}
//根据验证码获取JWT令牌
export const verificationCodeLogin = params => {
  return http.postJWT("/api/Jwt/VerificationCodeLogin", params);
}
//修改密码
export const putSysUserChangePassword = params => {
  return http.putJWT("/api/SysUser/ChangePassword", params);
}
//修改密码 加密
export const putSysUserChangePasswordByEncrypt = params => {
  return http.putJWT("/api/SysUser/ChangePasswordByEncrypt", params);
}
//修改密码 加密
export const putSysUserChangePasswordByBase64 = params => {
  return http.putJWT("/api/SysUser/ChangePasswordByBase64", params);
};
//获取用户拥有权限的菜单树列表数据
export const getUserMenuTreeList = params => {
  return http.getJWT("/api/SysUser/GetUserMenuTreeList", params, "query");
}
//获取用户拥有权限的菜单树列表数据 包含菜单对应的权限
export const getSysUserUserMenuTreeAndRightList = params => {
  return http.getJWT("/api/SysUser/GetUserMenuTreeAndRightList", params, "query");
}
//获取医院列表数据
export const getSysHospitalGetList = params => {
  return http.getJWT("/api/SysHospital/GetList", params, "query");
}
//获取医院数据
export const getSysHospitalGetModelByCode = params => {
  return http.getJWT("/api/SysHospital/GetModelByCode", params, "query");
}
//获取医院列表数据-用户权限
export const getSysUserHospitalList = params => {
  return http.getJWT("/api/SysUser/GetUserHospitalList", params, "query");
}
//获取用户列表
export const getSysUserGetList = params => {
  return http.getJWT("/api/SysUser/GetList", params, "query");
}
//获取一体化科室
export const getDeptList = params => {
  return http.getJWT('/api/SysDepartment/GetList', params, 'query')
}
// 获取角色列表
export const getRoleList = params => {
  return http.getJWT('/api/SysRole/GetList', params, 'query')
}
export const getUsersPage = params => {
  return http.getJWT('/api/SysUser/GetPages', params, 'query')
}
//获取医院列表分页
export const syshospitalGetpages = params => {
  return http.getJWT('/api/syshospital/getpages', params, 'query')
}

// 获取时段模板和历史预约数量 pi​/v1​/appointmentcheckroomdmb​/getrecommendlist
// export const getrecommendlist = params => {
//   return http.get('/api​/v1/appointmentcheckroomdmb​/getrecommendlist', params, 'query')
// }

export const getrecommendlist = params => {
  return http.get('/api/v1/appointmentcheckroomdmb/getrecommendlist', params, "query")
}

//获取号源比例数量列表 /api/v1/appointmentruleinfo/getnumberscalerulelist
export const getnumberscalerulelist = params => {
  return http.get('/api/v1/appointmentruleinfo/getnumberscalerulelist', params, 'query')
}

// 批量维护号源比例数量 /api/v1/appointmentruleinfo/setnumberscalerulelist
export const setnumberscalerulelist = params => {
  return http.put('/api/v1/appointmentruleinfo/setnumberscalerulelist', params)
}

//获取医院应用配置数据
export const getHospitalAppsettings = params => {
  return http.get("/api/hospital/getappsettings", params, "query");
}

//获取JWT令牌， 调用临床预约用
export const mobileJwtAccessTokenEncrypt = params => {
  return http.post("/api/v1/mobileJwt/AccessTokenEncrypt", params);
}

// 机房号源迁移
export const appointmentlistdmbBatchmove = params => {
  return http.post("/api/v1/appointmentlistdmb/batchmove", params);
}

/**
 * 全预约
 */
// 获取全预约规则分页列表
export const getAppointmentRuleInfoPages = params => {
  return http.get('/api/v1/AppointmentRuleInfo/GetPages', params, 'query')
}

// 获取全预约规则内容列表
export const getAppointmentRuleContentList = params => {
  return http.get('/api/v1/AppointmentRuleContent/GetList', params, 'query')
}

// 新增时限预约规则
export const addTimeLimitRule = params => {
  return http.post('/api/v1/AppointmentRuleInfo/AddTimeLimitRule', params)
}
// 新增时段预约规则
export const addTimeIntervalRule = params => {
  return http.post('/api/v1/AppointmentRuleInfo/AddTimeIntervalRule', params)
}
// 新增关联
export const addRelationRule = params => {
  return http.post('/api/v1/appointmentruleinfo/addrelationrule', params)
}
// 新增排斥
export const addExcludeRule = params => {
  return http.post('/api/v1/appointmentruleinfo/addexcluderule', params)
}
// 新增顺序
export const addSequenceRule = params => {
  return http.post('/api/v1/appointmentruleinfo/addsequencerule', params)
}
// 新增优先
export const addPriorRule = params => {
  return http.post('/api/v1/appointmentruleinfo/addpriorrule', params)
}
//新增合并
export const addMergerule = params => {
  return http.post('/api/v1/appointmentruleinfo/addmergerule', params)
}
//新增拆分
export const addSplitrule = params => {
  return http.post('/api/v1/appointmentruleinfo/addsplitrule', params)
}
//新增时段条件规则
export const addtimeconditionrule = params => {
  return http.post('/api/v1/appointmentruleinfo/addtimeconditionrule', params)
}
//新增号源比例条件规则
export const addnumberscale = params => {
  return http.post('/api/v1/appointmentruleinfo/addnumberscalerule', params)
}
//新增孕周规则
export const addgestationalweekrule = params => {
  return http.post('/api/v1/appointmentruleinfo/addgestationalweekrule', params)
}
//新增申请单约束条件
export const addexamlimitrule = params => {
  return http.post('/api/v1/appointmentruleinfo/addexamlimitrule', params)
}
// 新增申请单图片
export const applyimagepost = params => {
  return http.post('/api/v1/applyimage/post', params)
}
// 删除申请单图片信息
export const applyimagedelete = params => {
  return http.delete('/api/v1/applyimage/delete', params, 'delete')
}
// 删除时令 /api/hospital/delete
export const hospitalDelete = params => {
  return http.delete('/api/hospital/delete', params, 'delete')
}
// 获取申请单图片信息对象
export const applyimagegetmodel = params => {
  return http.get('/api/v1/applyimage/getmodel', params, 'query')
}
// 获取院区下申请单图片列表数据/api/v1/applyimage/getlist
export const applyimagegetlist = params => {
  return http.get('/api/v1/applyimage/getlist', params, 'query')
}
// 修改时限
export const editTimeLimitRule = params => {
  return http.put('/api/v1/appointmentruleinfo/editTimeLimitRule', params)
}
// 修改时段
export const editTimeIntervalRule = params => {
  return http.put('/api/v1/appointmentruleinfo/edittimeintervalrule', params)
}
// 新增改约规则 ​/api​/v1​/appointmentruleinfo​/addchangerule
export const addchangerule = params => {
  return http.post('/api/v1/appointmentruleinfo/addchangerule', params)
}
// 修改改约规则
export const editchangerule = params => {
  return http.put('/api/v1/appointmentruleinfo/editchangerule', params)
}
// 新增取消预约规则 ​/api​/v1​/appointmentruleinfo​/addcancelrule
export const addcancelrule = params => {
  return http.post('/api/v1/appointmentruleinfo/addcancelrule', params)
}
// 修改取消预约规则
export const editcancelrule = params => {
  return http.put('/api/v1/appointmentruleinfo/editcancelrule', params)
}
// 修改关联
export const editRelationRule = params => {
  return http.put('/api/v1/appointmentruleinfo/editrelationrule', params)
}
// 修改排斥
export const editExcludeRule = params => {
  return http.put('/api/v1/appointmentruleinfo/editexcluderule', params)
}
// 修改顺序
export const editSequenceRule = params => {
  return http.put('/api/v1/appointmentruleinfo/editsequencerule', params)
}
// 修改优先
export const editPriorRule = params => {
  return http.put('/api/v1/appointmentruleinfo/editpriorrule', params)
}
// 修改合并
export const editMergerule = params => {
  return http.put('/api/v1/appointmentruleinfo/editmergerule', params)
}
// 修改拆分
export const editSplitrule = params => {
  return http.put('/api/v1/appointmentruleinfo/editsplitrule', params)
}
// 修改时段条件
export const edittimeconditionrule = params => {
  return http.put('/api/v1/appointmentruleinfo/edittimeconditionrule', params)
}
// 修改号源比例条件
export const editnumberscalerule = params => {
  return http.put('/api/v1/appointmentruleinfo/editnumberscalerule', params)
}
// 修改孕周规则
export const editgestationalweekrule = params => {
  return http.put('/api/v1/appointmentruleinfo/editgestationalweekrule', params)
}
// 修改申请单约束条件
export const editexamlimitrule = params => {
  return http.put('/api/v1/appointmentruleinfo/editexamlimitrule', params)
}
// 删除规则
export const deleteAppointmentRuleInfo = params => {
  return http.delete('/api/v1/AppointmentRuleInfo/Delete', params, 'query')
}
// 启用规则
export const setOpenAppointmentRuleInfo = params => {
  return http.put('/api/v1/AppointmentRuleInfo/SetOpen', params)
}
// 禁用规则
export const setCloseAppointmentRuleInfo = params => {
  return http.put('/api/v1/AppointmentRuleInfo/SetClose', params)
}
// 影像区域列表
export const getDepAreaList = params => {
  return http.get('/api/v1/checkroom/getdeparealist', params, 'query')
}
// 获取医院下院区+检查部门+检查设备+检查机房四级树
export const getcheckroomGroupList = params => {
  return http.get('/api/v1/checkroom/getgrouplist', params, 'query')
}
// 获取医院下院区+检查部门+设备类型+检查机房四级树
export const getcheckroomModalityTypeGroupList = params => {
  return http.get('/api/v1/checkroom/getdepareatreebymodalitytype', params, 'query')
}
// 获取医院+院区+检查部门+检查设备+检查机房四级树
export const getcheckroomGethospitalanddeptree = params => {
  return http.get('/api/v1/checkroom/gethospitalanddeptree', params, 'query')
}
// 获取医院+检查部门+设备类型三级树
export const getcheckroomGetdepandmodalitytree = params => {
  return http.get('/api/v1/checkroom/getdepandmodalitytree', params, 'query')
}

/**
 * 检查机房模块
 * */
// 获取分页列表数据
export const getCheckroomPages = params => {
  return http.get('/api/v1/checkroom/getpages', params, 'query')
}
// 获取检查机房列表数据
export const getcheckrooms = params => {
  return http.get('/api/v1/checkroom/getcheckrooms', params, 'query')
}
// 添加检查机房
export const addCheckroom = params => {
  return http.post('/api/v1/checkroom/add', params)
}
// 修改检查机房
export const editCheckroom = params => {
  return http.put('/api/v1/checkroom/edit', params)
}
// 删除检查机房
export const deleteCheckroom = params => {
  return http.delete('/api/v1/checkroom/delete', params)
}
// 检查机房绑定His检查部位
export const checkroomBindHis = params => {
  return http.post('/api/v1/checkroom/sethisregisterpart', params)
}
// 获取部位统计信息列表--无痛胃肠镜特殊处理 /api/v1/callregister/getpartstatistics
export const getpartstatistics = params => {
  return http.get('/api/v1/callregister/getpartstatistics', params, 'query')
}
// 获取检查部门列表
export const getDepList = params => {
  return http.get('/api/v1/checkroom/getdeplist', params, 'query')
}
// 获取检查机房列表
export const getCheckRoomList = params => {
  return http.get('/api/v1/checkroom/getcheckroomlist', params, 'query')
}
// 获取检查设备列表
export const getModalityList = params => {
  return http.get('/api/v1/checkroom/getmodalitylist', params, 'query')
}
//获取检查类型列表
export const getExamList = params => {
  return http.get('/api/v1/checkroom/getlistbyexamtype', params, 'query')
}
// 获取检查设备类型列表
export const getModalityTypeList = params => {
  return http.get('/api/v1/checkroom/getmodalitytypelist', params, 'query')
}
// 获取检查分组列表
export const getCheckGroupList = params => {
  return http.get('/api/v1/checkroom/getcheckgrouplist', params, 'query')
}
// 获取院区名称列表
export const getListByAreaName = params => {
  return http.get('/api/v1/checkroom/getlistbyareaname', params, 'query')
}
// 获取部位设备列表
export const getlistbypartmodality = params => {
  return http.get('/api/v1/hisregisterpart/getlistbypartmodality', params, 'query')
}
// 获取词库模板部位列表
export const getlistbytemplatepart = params => {
  return http.get('/api/v1/hisregisterpart/getlistbytemplatepart', params, 'query')
}
// 批量修改检查分组列表
export const setCheckGroup = params => {
  return http.post('/api/v1/hisregisterpart/setcheckgroup', params)
}
// 批量修改系数
export const setWorkCount = params => {
  return http.post('/api/v1/hisregisterpart/setworkcount', params)
}
// 批量修改部位设备
export const setpartmodality = params => {
  return http.post('/api/v1/hisregisterpart/setpartmodality', params)
}
// 批量修改词库模板部位
export const settemplatepart = params => {
  return http.post('/api/v1/hisregisterpart/settemplatepart', params)
}
// 获取检查机房下绑定的His检查部位列表
export const getHisRegisterList = params => {
  return http.get('/api/v1/checkroom/gethisregisterlist', params, 'query')
}
// 修改检查机房状态
export const updateCheckroomState = params => {
  return http.put('/api/v1/checkroom/updatecheckroomstate', params)
}
// 获取检查机房对象数据
export const getCheckroomModel = params => {
  return http.get('/api/v1/checkroom/getmodel', params, 'query')
}
//判处AeTitle是否已存在
export const getisexistbyaetitle = params => {
  return http.get('/api/v1/checkroom/getisexistbyaetitle', params, 'query')
}
//获取检查地点列表
export const getlistbymodalityaddress = params => {
  return http.get('/api/v1/checkroom/getlistbymodalityaddress', params, 'query')
}
// 修改机房连续号源配置
export const putupdatecontinuitynum = params => {
  return http.put('/api/v1/checkroom/updatecontinuitynum', params)
}
// /api/v1/checkroom/getlistbyexamtype 获取检查类型列表
export const getlistbyexamtype = params => {
  return http.get('/api/v1/checkroom/getlistbyexamtype', params, 'query')
}
// /api/v1/checkroom/getlistbyareaname 获取院区名称
export const getlistbyareaname = params => {
  return http.get('/api/v1/checkroom/getlistbyareaname', params, 'query')
}
// 获取院区代码列表
export const getcheckroomgetlistbyareano = params => {
  return http.get('/api/v1/checkroom/getlistbyareano', params, 'query')
}
// 获取护士站列表
export const getcheckroomgetlistbynursestation = params => {
  return http.get('/api/v1/checkroom/getlistbynursestation', params, 'query')
}
// 批量设置护士站
export const postcheckroomsetnursestation = params => {
  return http.post('/api/v1/checkroom/setnursestation', params)
}
// 批量更新检查部门的机房排序
export const postSetDepOrders = params => {
  return http.put('/api/v1/checkroom/setdeporders', params)
}
// 批量更新检HIS部位的排序
export const putSetPartOrders = params => {
  return http.put('/api/v1/hisregisterpart/setpartorders', params)
}
// 批量设置机房地址
export const postcheckroomsetmodalityaddress = params => {
  return http.post('/api/v1/checkroom/setmodalityaddress', params)
}
// 批量设置院区
export const postcheckroomsetareaname = params => {
  return http.post('/api/v1/checkroom/setareaname', params)
}
// 批量设置机房分组
export const postcheckroomsetcheckgroup = params => {
  return http.post('/api/v1/checkroom/setcheckgroup', params)
}
// 批量设置检查类型
export const postsetexamtype = params => {
  return http.post('/api/v1/checkroom/setexamtype', params)
}
/**
 *his相关接口
 */
// 获取His检查类型+检查部位多级树
export const getHisDepTree = params => {
  return http.get('/api/v1/hisregisterpart/getdeptree', params, 'query')
}
// 获取His检查类型+检查部位多级树+部门参数
export const getHisTree = params => {
  return http.get('/api/v1/hisregisterpart/gettree', params, 'query')
}
// 获取his检查部位列表
export const getBigPartList = params => {
  return http.get('/api/v1/hisregisterpart/getbigpartlist', params, 'query')
}
// 获取His检查部位分页列表
export const getHisRegisterPages = params => {
  return http.get('/api/v1/hisregisterpart/getpages', params, 'query')
}
// 获取项目属性列表
export const getHisRegisterpartGetitempropertylist = params => {
  return http.get('/api/v1/hisregisterpart/getitempropertylist', params, 'query')
}
// 绑定机房
export const hisBindCheckroom = params => {
  return http.post('/api/v1/hisregisterpart/setcheckroom', params)
}
// 修改检查部位
export const updateHisRegister = params => {
  return http.put('/api/v1/hisregisterpart/update', params)
}
// 新增检查部位
export const addHisRegister = params => {
  return http.post('/api/v1/hisregisterpart/insert', params)
}
// 删除检查部位
export const deleteHisRegister = params => {
  return http.delete('/api/v1/hisregisterpart/delete', params, 'query')
}
// 获取His检查部位下绑定的检查机房列表
export const getHisCheckroomList = params => {
  return http.get('/api/v1/hisregisterpart/getcheckroomlist', params, 'query')
}
// 获取His检查项目列表
export const getHisCheckroomgetSmallpartlist = params => {
  return http.get('/api/v1/hisregisterpart/getsmallpartlist', params, 'query')
}
// 获取规则检查类型
export const getRuleTypeList = params => {
  return http.get('/api/v1/appointmentruletype/getlist', params, 'query')
}
// 获取His检查部位分页列表 超级查询
export const postHisRegisterpartGetadvancepages = params => {
  return http.post('/api/v1/hisregisterpart/getadvancepages', params)
}

/**
 * 数据字典相关接口
 */
// 数据字典获取
export const getItemDicList = params => {
  return http.get('/api/v1/appointmentruledic/getlist', params, 'query')
}
// 数据字典分页
export const getItemDicPages = params => {
  return http.get('/api/v1/appointmentruledic/getpages', params, 'query')
}
// 删除数据字典
export const deleteItemDicdmb = params => {
  return http.delete('/api/v1/appointmentruledic/delete', params, 'query')
}
// 添加数据字典
export const addItemDicdmb = params => {
  return http.post('/api/v1/appointmentruledic/add', params)
}
// 修改数据字典
export const editItemDicdmb = params => {
  return http.put('/api/v1/appointmentruledic/edit', params)
}
/**
 * 预约时段
 */
// 获取预约时段分页列表数据
export const getAppPages = params => {
  return http.get('/api/v1/appointmentlistdmb/getpages', params, 'query')
}
export const getAppLists = params => {
  return http.get('/api/v1/appointmentlistdmb/getlist', params, 'query')
}
export const importAppLists = params => {
  return http.post('/api/v1/appointmentlistdmb/import', params)
}
export const postGetAppGetadvancepages = params => {
  return http.post('/api/v1/appointmentlistdmb/getadvancepages', params)
}
export const putAppointmentlistdmbsets = params => {
  return http.put('/api/v1/appointmentlistdmb/appointmentlistdmbsets', params)
}
// 批量更新预约时段
export const importAppListsbatchupdate = params => {
  return http.post('/api/v1/appointmentlistdmb/batchupdate', params)
}
export const insertAppLists = params => {
  return http.post('/api/v1/appointmentlistdmb/insert', params)
}
export const updateAppLists = params => {
  return http.put('/api/v1/appointmentlistdmb/update', params)
}
export const updateappointmentstatus = params => {
  return http.put('/api/v1/appointmentlistdmb/updateappointmentstatus', params)
}
export const deleteAppLists = params => {
  return http.delete('/api/v1/appointmentlistdmb/delete', params)
}
// 检查预约申请单 根据传入的检查预约申请单，查询匹配的预约时段列表
export const postCheckappointmentlog = params => {
  return http.post('/api/v1/appointmentlistdmb/checkappointmentlog', params)
}
// 检查预约申请单 根据传入的检查预约申请单，查询匹配的预约时段列表
export const getappointmentlistdmbgetnumbers = params => {
  return http.get('/api/v1/appointmentlistdmb/getnumbers', params, 'query')
}
// 根据申请单获取可预约时段列表 包含预约规则判断
export const chooseAppointment = params => {
  return http.post('/api/v1/appointmentlistdmb/chooseappointment', params)
}
// 周时段模板批量同步到某日之后的所有预约时段
export const postappointmentlistdmbsyncappointment = params => {
  return http.post('/api/v1/appointmentlistdmb/syncappointment', params)
}
// 预约时段批量设置限制条件 当前系统时间之前日期的不能修改
export const putappointmentlistdmbsetfilters = params => {
  return http.put('/api/v1/appointmentlistdmb/appointmentlistdmbsetfilters', params)
}
// 机房号源日汇总查询
export const postappointmentlistdmbcheckroomsummarylist = params => {
  return http.post('/api/v1/appointmentlistdmb/checkroomsummarylist', params)
}
// 修改检查机房自动发布状态、周
export const putAppointmentlistdmbSetautopublish = params => {
  return http.put('/api/v1/appointmentlistdmb/setautopublish', params)
}

// 获取预约时段条件列表数据
export const getAppFiltersLists = params => {
  return http.get('/api/v1/appointmentfilterlistdmb/getlist', params, 'query')
}
// 获取预约时段条件列表数据
export const getDengjipartList = params => {
  return http.get('/api/v1/registerpart/getdengjipartlist', params, 'query')
}
// 获取预约时段条件列表数据
export const getCheckitemlist = params => {
  return http.get('/api/v1/registerpart/getcheckitemlist', params, 'query')
}


/*
预约时段模版
*/
// 模版时段分页
export const getAppTempPages = params => {
  return http.get('/api/v1/appointmentcheckroomdmb/getpages', params, 'query')
}
export const getAppTempList = params => {
  return http.get('/api/v1/appointmentcheckroomdmb/getlist', params, 'query')
}
// 获取预约时段模板对象 包含参数条件列表
export const getAppTempModelex = params => {
  return http.get('/api/v1/appointmentcheckroomdmb/getmodelex', params, 'query')
}
// 时段模板高级查询分页列表
export const postAppTempAdvancepages = params => {
  return http.post('/api/v1/appointmentcheckroomdmb/getadvancepages', params)
}
// 时段模板批量设置限制条件
export const putAppTempDmbsetfilters = params => {
  return http.put('/api/v1/appointmentcheckroomdmb/appointmentcheckroomdmbsetfilters', params)
}
// 获取查询日期之后的预约时段模板列表【启用状态】数据 包含模板的参数条件列表
export const getAppTempAppointmentlist = params => {
  return http.get('/api/v1/appointmentcheckroomdmb/getappointmentlist', params, 'query')
}
export const postAppTempbatchupdate = params => {
  return http.post('/api/v1/appointmentcheckroomdmb/batchupdate', params)
}
export const addAppTemp = params => {
  return http.post('/api/v1/appointmentcheckroomdmb/insert', params)
}
export const editAppTemp = params => {
  return http.put('/api/v1/appointmentcheckroomdmb/update', params)
}
export const deleteAppTemp = params => {
  return http.delete('/api/v1/appointmentcheckroomdmb/delete', params)
}
// 导入参数模板
export const importAppointmentCheckroom = params => {
  return http.post('/api/v1/appointmentcheckroomdmb/import', params)
}
// 获取时段模板和历史预约数量
export const getAppointmentCheckroomRecommendlist = params => {
  return http.get('/api/v1/appointmentcheckroomdmb/getrecommendlist', params, 'query')
}

/*
参数模板
*/
// 获取参数模板分页列表数据
export const getAppointmentparameterdmb = params => {
  return http.get('/api/v1/appointmentparameterdmb/getpages', params, 'query')
}

// 获取参数模板列表数据
export const getAppointmentparameterdmbgetlist = params => {
  return http.get('/api/v1/appointmentparameterdmb/getlist', params, 'query')
}

// 新增参数模板
export const addAppointmentparameterdmb = params => {
  return http.post('/api/v1/appointmentparameterdmb/insert', params)
}

// 编辑参数模板
export const eidtAppointmentparameterdmb = params => {
  return http.put('/api/v1/appointmentparameterdmb/update', params)
}

// 删除参数模板
export const deleteAppointmentparameterdmb = params => {
  return http.delete('/api/v1/appointmentparameterdmb/delete', params)
}

// 获取预约时段模板条件列表
export const getAppointmentfilterdmb = params => {
  return http.get('/api/v1/appointmentfilterdmb/getlist', params, 'query')
}

// 获取患者申请单分页列表数据 数据来源ris患者主表测试用
export const getcallregistergetpatpages = params => {
  return http.get('/api/v1/callregister/getpatpages', params, 'query')
}

// 获取预约记录分页列表数据
export const getcallregistergetpages = params => {
  return http.get('/api/v1/callregister/getpages', params, 'query')
}

//预约列表高级查询--分页
export const getadvancedpages = params => {
  return http.post('/api/v1/callregister/getadvancedpages', params)
}

// 获取患者已预约列表
export const getpathasappointmentlist = params => {
  return http.post('/api​/v1​/callregister​/getpathasappointmentlist', params)
}

// 获取患者已预约记录分页列表数据
export const getpagesbyappointmentlistdmb = params => {
  return http.get('/api/v1/callregister/getpagesbyappointmentlistdmb', params, 'query')
}

// 获取已预约记录对象 包含已预约申请单和预约时段 用于变更预约功能
export const getcallregistergetcallregistermodel = params => {
  return http.get('/api/v1/callregister/getcallregistermodel', params, 'query')
}

// 检查预约
export const postcallregistercheckappointment = params => {
  return http.post('/api/v1/callregister/checkappointment', params)
}

// 临床预约
export const postcallregisterclinicalappointment = params => {
  return http.post('/api/v1/callregister/clinicalappointment', params)
}

// 变更预约
export const postcallregisterchangeappointment = params => {
  return http.post('/api/v1/callregister/changeappointment', params)
}

// 取消预约
export const postcallregistercancelappointment = params => {
  return http.post('/api/v1/callregister/cancelappointment', params)
}

// 批量取消预约
export const postcallregistercancelappointmentlist = params => {
  return http.post('/api/v1/callregister/cancelappointmentlist', params)
}

// 批量签到
export const postsigninorder = params => {
  return http.post('/api/v1/callregister/signinorder', params)
}

// 获取检验结果列表
export const getlistResult = params => {
  return http.post('/api/v1/callregister/getlisresult', params)
}

// 批量号码单呼叫
export const postreportcall = params => {
  return http.post('/api/v1/callregister/reportcall', params)
}
// 取消预约打印预约结果
export const getcancelchargeresult = (hospitalCode, accessNo) => {
  return http.post('/api/v1/callregister/getcancelchargeresult?HospitalCode=' + hospitalCode + '&AccessNo=' + accessNo)
}

//变更预约
export const getappointmentresultmodel = (applyHospitalCode, hospitalCode, accessNo) => {
  return http.get('/api/v1/callregister/getappointmentresultmodel?ApplyHospitalCode=' + applyHospitalCode + '&HospitalCode=' + hospitalCode + '&accessNo=' + accessNo)
}

/**
 * 数据字典
 */
// 获取字典类型的分组列表
export const getTypeGroupList = params => {
  return http.get('/api/v1/itemdicdmb/gettypegrouplist', params, 'query')
}

// 获取字典类型下项目的分组列表
export const getItemGroupList = params => {
  return http.get('/api/v1/itemdicdmb/getitemgrouplist', params, 'query')
}

// 获取数据字典分页列表
export const getItemPages = params => {
  return http.get('/api/v1/itemdicdmb/getpages', params, 'query')
}

// 获取字典该类型的相应级别下列表 影像区域、检查部门、检查设备三个有值就属于哪个级别
export const getItemList = params => {
  return http.get('/api/v1/itemdicdmb/getlist', params, 'query')
}

// 新增字典
export const insertItemList = params => {
  return http.post('/api/v1/itemdicdmb/insert', params)
}

// 修改字典
export const updateItemList = params => {
  return http.put('/api/v1/itemdicdmb/update', params)
}

// 删除字典
export const deleteItemList = params => {
  return http.delete('/api/v1/itemdicdmb/delete', params)
}

// 获取医院字典类型树
export const getItemdicdmbGettypetree = params => {
  return http.get('/api/v1/itemdicdmb/gettypetree', params, 'query')
}

/**
 * 预约模板单
 */
// 获取分页
export const getTemplatePages = params => {
  return http.get('/api/v1/appointmenttemplateinfo/getpages', params, 'query')
}

// 新增模板
export const addTemplate = params => {
  return http.post('/api/v1/appointmenttemplateinfo/post', params)
}

// 修改模板
export const updateTemplate = params => {
  return http.put('/api/v1/appointmenttemplateinfo/put', params)
}

// 删除模板
export const deleteTemplate = params => {
  return http.delete('/api/v1/appointmenttemplateinfo/delete', params)
}

/**
 * 排班设置
 */
// 医院list
export const getHospList = params => {
  return http.get('/api/hospital/getlist', params, 'query')
}

// 设置医院班次时令
export const setHospitalSetting = params => {
  return http.post('/api/hospital/settings', params)
}

// 获取医院班次时令
export const getHospitalSetting = params => {
  return http.get('/api/hospital/getsettings', params, 'query')
}

//设置医院缴费规则
export const feesettings = params => {
  return http.post('/api/hospital/feesettings', params)
}

//获取医院缴费规则
export const getfeesettings = params => {
  return http.get('/api/hospital/getfeesettings', params, 'query')
}

//设置医院缴费规则
export const invalidsettings = params => {
  return http.post('/api/hospital/filterinvalidsettings', params)
}

//获取医院缴费规则
export const getInvalidsettings = params => {
  return http.get('/api/hospital/getfilterinvalidsettings', params, 'query')
}

//刷新redis缓存
export const getRefreshCache = params => {
  return http.get("/api/hospital/RefreshCache", params, 'query');
}

// 获取医院及用户的配置
export const getparamtersettings = params => {
  return http.get("/api/hospital/getparamtersettings", params, 'query');
}

// 设置医院的配置
export const postSethospitalparamtersettings = params => {
  return http.post("/api/hospital/sethospitalparamtersettings", params);
}

// 设置用户的配置
export const postSetuserparamtersettings = params => {
  return http.post("/api/hospital/setuserparamtersettings", params);
}

// 节假日获取
export const getHolidayList = params => {
  return http.get('/api/AppointmentHoliday/GetList', params, 'query')
}

// 节假日保存
export const setHolidayList = params => {
  return http.post('/api/AppointmentHoliday/setholidays', params)
}

/**
 * 操作记录
 */
export const getAppointmentRecordsInfoPages = params => {
  return http.get('/api/v1/setuplog/getpages', params, 'query')
}

// 获取预约时段日志列表
export const getSetuplogGetlist = params => {
  return http.get('/api/v1/setuplog/getlist', params, 'query')
}

//预约来源查询
export const getSourceenquiryPages = params => {
  return http.get('/api/v1/callregister/getpages', params, 'query')
}

//申请单基础信息修改
export const changepatexam = params => {
  return http.post('/api/v1/callregister/changepatexam', params)
}

//获取已预约数据列表--根据访问号 包含HIS申请单和已预约时段 用于批量变更预约功能
export const getAppointmentResultListByAccessno = params => {
  return http.get('/api/v1/callregister/getappointmentresultlistbyaccessno', params, 'query')
}
/**
 * 统计接口
 */

// 预约统计来源
export const getDataForSource = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForSource', params, 'query')
}
export const getDataForAppointmentSource = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForAppointmentSource', params, 'query')
}

// 患者类型统计接口
export const getDataForPatientType = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForPatientType', params, 'query')
}

// 申请科室统计接口
export const getDataForDepartment = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForDepartment', params, 'query')
}

// 申请医生统计接口
export const getDataForDoc = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForDoc', params, 'query')
}

// 机房预约统计接口
export const getDataForCheckRoomApp = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForCheckRoomApp', params, 'query')
}

// 部门预约统计接口
export const getDataForDep = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForDep', params, 'query')
}

// 部门检查时间统计接口
export const getDataForDepCheckTime = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForDepCheckTime', params, 'query')
}

// 部门预约统计图表接口
export const getDataForDepChart = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForDepChart', params, 'query')
}

// 机房预约统计图表接口
export const getDataForCheckRoomChart = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForCheckRoomChart', params, 'query')
}

// 病区-申请医生统计接口
export const getDataForAreaDoc = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForAreaDoc', params, 'query')
}
// 科室-申请医生统计接口
export const getDataForSQDepDoc = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForSQDepDoc', params, 'query')
}

// 获取部门-设备平均时间统计接口
export const getDepModalityAvgData = params => {
  return http.getOther('/api/AppointmentStatistics/GetDepModalityAvgData', params, 'query')
}

//获取设备工作量统计接口
export const getModalityWorkLoadData = params => {
  return http.getOther('/api/AppointmentStatistics/GetModalityWorkLoadData', params, 'query')
}

//获取检查设备患者类型工作量统计接口
export const getModalityPatTypeWorkLoadData = params => {
  return http.getOther('/api/AppointmentStatistics/GetModalityPatTypeWorkLoadData', params, 'query')
}

//当天检查设备-机房预约统计
export const getAppointmentInfoData = params => {
  return http.getOther('/api/AppointmentStatistics/GetAppointmentInfoData', params, 'query')
}
// 部门临床预约率统计
export const getAppointmentRate = params => {
  return http.getOther('/api/AppointmentStatistics/GetYYL', params, 'query')
}

// 床边动态心电查询报表
export const getBedsideDynamicECG = params => {
  return http.getOther('/api/AppointmentStatistics/GetBedsideDynamicECG', params, 'query')
}
// 门诊急诊预约情况报表
export const getAppointmentMZJZYYQK = params => {
  return http.getOther('/api/AppointmentStatistics/GetMZJZYYQK', params, 'query')
}
// 登记人员工作量统计
export const getDataForRegDoctor = params => {
  return http.getOther('/api/AppointmentStatistics/GetDataForRegDoctor', params, 'query')
}
//机房预约情况统计
export const getCheckRoomAppointmentStatistics = params => {
  return http.getOther('/api/AppointmentStatistics/GetCheckRoomAppointmentStatistics', params, 'query')
}
/**
 * 其他维护
 */
export const getXnoPages = params => {
  return http.get('/api/v1/xno/getpages', params, 'query')
}

//影像号保存
export const setXnoPages = params => {
  return http.post('/api/v1/xno/insert', params)
}
//影像号编辑
export const updateXnoPages = params => {
  return http.put('/api/v1/xno/update', params)
}
//影像号删除
export const deleteXnoPages = params => {
  return http.delete('/api/v1/xno/delete', params)
}

//访问号维护
export const getStreamIdpages = params => {
  return http.get('/api/v1/streamId/getpages', params, 'query')
}

//访问号保存
export const setStreamIdpages = params => {
  return http.post('/api/v1/streamId/insert', params)
}

//访问号编辑
export const updateStreamIdPages = params => {
  return http.put('/api/v1/streamId/update', params)
}
//访问号删除
export const deleteStreamIdPages = params => {
  return http.delete('/api/v1/streamId/delete', params)
}

//日志查询
export const getFlogPages = params => {
  return http.get('/api/v1/flog/getpages', params, 'query')
}
//日志查询详情
export const getFlogModel = params => {
  return http.get('/api/v1/flog/getmodel', params, 'query')
}
//获取相关列表数据
export const getflogcontentlist = params => {
  return http.get('/api/v1/flog/getflogcontentlist', params, "query")
}
// 获取检查报告的痕迹日志列表数据
export const getFlogList = params => {
  return http.get('/api/v1/flog/getlist', params, "query")
}

/* 黑名单 */
//黑名单表格查询
export const getBlackListPage = params => {
  return http.get('/api/AppointmentBlackList/GetPages', params, 'query')
}
//解禁黑名单
export const openBlackList = params => {
  return http.put('/api/AppointmentBlackList/OpenStatus', params)
}
//从黑名单中删除
export const deleteBlackList = params => {
  return http.delete('/api/AppointmentBlackList/Delete', params)
}
//手动添加黑名单
export const addToBlackLis = params => {
  return http.post('/api/AppointmentBlackList/Batch', params)
}
//患者查询
export const getPeoplePatlist = params => {
  return http.get('/api/v1/callregister/getpatlist', params, 'query')
}
//黑名单规则列表
export const getBlackRuleListPages = params => {
  return http.get('/api/AppointmentBlacklistRule/GetPages', params, 'query')
}
//黑名单规则添加
export const addBlackRuleList = params => {
  return http.post('/api/AppointmentBlacklistRule/Post', params)
}
//黑名单规则删除
export const delBlackRule = params => {
  return http.delete('/api/AppointmentBlacklistRule/Delete', params)
}
//黑名单规则编辑
export const updateBlackRule = params => {
  return http.put('/api/AppointmentBlacklistRule/Put', params)
}
//黑名单详情
export const getBlackRuleDetail = params => {
  return http.get('/api/AppointmentBlacklistRule/GetModel', params, 'query')
}
/**
 * 预约单模板维护
 */
//预约单列表获取
export const reservationList = params => {
  return http.get('/api/v1/appointmenttemplateinfo/getlist', params, 'query')
}
//预约单模板新增
export const saveServation = params => {
  return http.post('/api/v1/appointmenttemplateinfo/post', params)
}
//获取预约单模板对象
export const getReservationObj = params => {
  return http.get('/api/v1/appointmenttemplateinfo/getmodel', params, 'query')
}
//获取预约单模板
export const getmodelbydep = params => {
  return http.get('/api/v1/appointmenttemplateinfo/getmodelbydep', params, 'query')
}
//预约单编辑保存
export const updateReservation = params => {
  return http.put('/api/v1/appointmenttemplateinfo/put', params)
}
//预约单删除
export const deleteReservation = params => {
  return http.delete('/api/v1/appointmenttemplateinfo/delete', params, 'query')
}
//预约单设置默认
export const setdefaultReservation = params => {
  return http.put('/api/v1/appointmenttemplateinfo/setdefault', params)
}
//导入his部位数据
export const importlist = params => {
  return http.post('/api/v1/hisregisterpart/importlist', params)
}
// 批量设置his部位数据注意事项字典组
export const postSetExamNoticeGroup = params => {
  return http.post('/api/v1/hisregisterpart/SetExamNoticeGroup', params)
}
// 批量设置his部位数据项目属性字典组
export const postSetItemProperty = params => {
  return http.post('/api/v1/hisregisterpart/SetItemProperty', params)
}
//获取好远操作记录对象
export const setuplogGetmodel = params => {
  return http.get('/api/v1/setuplog/getmodel', params, 'query')
}
//获取用户的医院数据权限树
export const getUserhospitalcheckroom = params => {
  return http.get('/api/v1/sysuserdataauthority/getuserhospitalcheckroom', params, 'query')
}
//设置用户数据权限
export const setUserdataauthority = params => {
  return http.post('/api/v1/sysuserdataauthority/setuserdataauthority', params)
}
//设置用户数据权限
export const getUserdataauthority = params => {
  return http.get('/api/v1/sysuserdataauthority/getuserdataauthority', params, 'query')
}
//获取医院数据权限树
export const gethospitaldataauthoritytree = params => {
  return http.get('/api/v1/syshospitaldataauthority/gethospitaldataauthoritytree', params, 'query')
}
//获取当前医院的医院数据权限列表
export const gethospitaldataauthority = params => {
  return http.get('/api/v1/syshospitaldataauthority/gethospitaldataauthority', params, 'query')
}
//设置医院的医院数据权限
export const sethospitaldataauthority = params => {
  return http.post('/api/v1/syshospitaldataauthority/sethospitaldataauthority', params)
}
// 监听管理
// 监听预约天数，列表
export const getAppointmentMonitorDayGetPages = params => {
  return http.get('/api/AppointmentMonitorDay/GetPages', params, 'query')
}
// 新增
export const postAppointmentMonitorDay = params => {
  return http.post('/api/AppointmentMonitorDay/Post', params)
}
// 修改
export const putAppointmentMonitorDay = params => {
  return http.put('/api/AppointmentMonitorDay/Put', params)
}
// 删除
export const deleteAppointmentMonitorDay = params => {
  return http.delete('/api/AppointmentMonitorDay/Delete', params, 'query')
}

// 监听预约记录，列表
export const getAppointmentMonitorInfoGetPages = params => {
  return http.get('/api/AppointmentMonitorInfo/GetPages', params, 'query')
}

// 问题反馈，列表
export const getAppointmentProblemInfoGetPages = params => {
  return http.get('/api/AppointmentProblemInfo/GetPages', params, 'query')
}
// 问题反馈，处理
export const putAppointmentProblemInfoUpdateState = params => {
  return http.put('/api/AppointmentProblemInfo/UpdateState', params)
}
// 问题反馈，问题详情
export const getAppointmentProblemInfoGetModel = params => {
  return http.get('/api/AppointmentProblemInfo/GetModel', params)
}

//获取号源比例规则下时段锁定号源记录分页
export const appointmentruledmbGetpages = params => {
  return http.get('/api/v1/appointmentruledmb/getpages', params, "query")
}
export const appointmentruledmbGetlist = params => {
  return http.get('/api/v1/appointmentruledmb/getlist', params, "query")
}

//获取版本号
export const getversion = params => {
  return http.get('/api/v1/mobileJwt/getversion', params, "query")
}

//获取HIS检查申请数据列表
export const postHisVisitor = params => {
  return http.post('/api/v1/hisexam/getvisits', params)
}
//获取HIS检查申请数据列表
export const postHisExam = params => {
  return http.post('/api/v1/hisexam/getexaminations', params)
}
//获取HIS检查申请数据列表，传参国密加密
export const postHisExamEncrypt = params => {
  return http.post('/api/v1/hisexam/getexaminationsencrypt', params)
}
// 获取His患者病历信息列表
export const postHisExamGetmedicals = params => {
  return http.post('/api/v1/hisexam/getmedicals', params)
}
// 获取His患者就诊信息列表, 数据来源汉凑his检查申请单api
export const postHisExamVisits = params => {
  return http.post('/api/v1/hisexam/getexaminations', params)
}
// 申请开单
export const postScheduleTrade = params => {
  return http.postSchedule('/api/v1/Trade', params)
}

// 短信管理模块
export const getMessagePages = params => {
  return http.get('/api/v1/setupsmsdmb/getpages', params, "query")
}

// 获取医院下短信模板列表
export const getMessageList = params => {
  return http.get('/api/v1/setupsmsdmb/getlist', params, "query")
}

// 发送短信
export const sendMessage = params => {
  return http.post('/api/v1/SmsSend/SendSms', params)
}

// 短信日志
export const getMessageLog = params => {
  return http.get('/api/v1/SmsSend/getlist', params, "query")
}

// 新增短信管理模块
export const addMessage = params => {
  return http.post('/api/v1/setupsmsdmb/post', params)
}

// 删除短信
export const deleteMessage = params => {
  return http.delete('/api/v1/setupsmsdmb/delete', params)
}

// 编辑短信
export const editMessage = params => {
  return http.put('/api/v1/setupsmsdmb/put', params)
}

// 启用短信
export const setOpenMessage = params => {
  return http.put('/api/v1/setupsmsdmb/setopen', params)
}
// 禁用短信
export const setCloseMessage = params => {
  return http.put('/api/v1/setupsmsdmb/setclose', params)
}
// 获取短信对象信息
export const getMessageModel = params => {
  return http.get('/api/v1/setupsmsdmb/getmodel', params, "query")
}
// 补费更新
export const supplementaryfeeupdate = params => {
  return http.post('/api/v1/callregister/supplementaryfeeupdate', params)
}
